<template>
  <div id="app">
    <transition name="fade" mode="out-in">
      <!-- <div id="nav"></div> -->
      <router-view />
    </transition>
  </div>
</template>
<script>
export default {
  data() {
    return {
      direction: "slide-right"
    }
  },
  watch: {
    $route(to, from) {
      if (to.fullPath === '/login' || to.fullPath === '/register') {
        this.showTab = false
      } else {
        this.showTab = true
      }
    }
  },
}
</script>

<style lang="scss">
#app {
  font-family: "Avenir", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  // text-align: center;
  color: #2c3e50;
}
/*页面切换动画*/ /*进入过渡的结束状态，元素被插入时就生效，在过渡过程完成后移除*/
.fade-enter-active {
  transition: opacity 0.3s;
} /*进入过渡的开始状态，元素被插入时生效，只应用一帧后立刻删除*/
.fade-enter {
  opacity: 0;
} /*离开过渡的开始状态，元素被删除时触发，只应用一帧后立刻删除*/
.fade-leave {
  opacity: 1;
} /*离开过渡的结束状态，元素被删除时生效，离开过渡完成后被删除*/
.fade-leave-active {
  opacity: 0;
  transition: opacity 0.3s;
}
</style>
